3.181 \(\int \frac{\sec (c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx\)

Optimal. Leaf size=61 \[ \frac{2}{a^3 d (\cot (c+d x)+i)}-\frac{i \log (\sin (c+d x))}{a^3 d}+\frac{i \log (\tan (c+d x))}{a^3 d}-\frac{x}{a^3} \]

[Out]

-(x/a^3) + 2/(a^3*d*(I + Cot[c + d*x])) - (I*Log[Sin[c + d*x]])/(a^3*d) + (I*Log[Tan[c + d*x]])/(a^3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0643177, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.103, Rules used = {3088, 848, 77} \[ \frac{2}{a^3 d (\cot (c+d x)+i)}-\frac{i \log (\sin (c+d x))}{a^3 d}+\frac{i \log (\tan (c+d x))}{a^3 d}-\frac{x}{a^3} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]/(a*Cos[c + d*x] + I*a*Sin[c + d*x])^3,x]

[Out]

-(x/a^3) + 2/(a^3*d*(I + Cot[c + d*x])) - (I*Log[Sin[c + d*x]])/(a^3*d) + (I*Log[Tan[c + d*x]])/(a^3*d)

Rule 3088

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> -Dist[d^(-1), Subst[Int[(x^m*(b + a*x)^n)/(1 + x^2)^((m + n + 2)/2), x], x, Cot[c + d*x]], x] /; FreeQ[
{a, b, c, d}, x] && IntegerQ[n] && IntegerQ[(m + n)/2] && NeQ[n, -1] &&  !(GtQ[n, 0] && GtQ[m, 1])

Rule 848

Int[((d_) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[(d + e*x)
^(m + p)*(f + g*x)^n*(a/d + (c*x)/e)^p, x] /; FreeQ[{a, c, d, e, f, g, m, n}, x] && NeQ[e*f - d*g, 0] && EqQ[c
*d^2 + a*e^2, 0] && (IntegerQ[p] || (GtQ[a, 0] && GtQ[d, 0] && EqQ[m + p, 0]))

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin{align*} \int \frac{\sec (c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{1+x^2}{x (i a+a x)^3} \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac{\operatorname{Subst}\left (\int \frac{-\frac{i}{a}+\frac{x}{a}}{x (i a+a x)^2} \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac{\operatorname{Subst}\left (\int \left (\frac{i}{a^3 x}+\frac{2}{a^3 (i+x)^2}-\frac{i}{a^3 (i+x)}\right ) \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac{x}{a^3}+\frac{2}{a^3 d (i+\cot (c+d x))}-\frac{i \log (\sin (c+d x))}{a^3 d}+\frac{i \log (\tan (c+d x))}{a^3 d}\\ \end{align*}

Mathematica [A]  time = 0.261845, size = 91, normalized size = 1.49 \[ \frac{i \sec ^2(c+d x) (\sin (2 (c+d x))-i \cos (2 (c+d x))) (\log (\cos (c+d x))+\tan (c+d x) (i \log (\cos (c+d x))+d x+i)-i d x-1)}{a^3 d (\tan (c+d x)-i)^3} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]/(a*Cos[c + d*x] + I*a*Sin[c + d*x])^3,x]

[Out]

(I*Sec[c + d*x]^2*((-I)*Cos[2*(c + d*x)] + Sin[2*(c + d*x)])*(-1 - I*d*x + Log[Cos[c + d*x]] + (I + d*x + I*Lo
g[Cos[c + d*x]])*Tan[c + d*x]))/(a^3*d*(-I + Tan[c + d*x])^3)

________________________________________________________________________________________

Maple [A]  time = 0.185, size = 40, normalized size = 0.7 \begin{align*}{\frac{i\ln \left ( \tan \left ( dx+c \right ) -i \right ) }{d{a}^{3}}}+2\,{\frac{1}{d{a}^{3} \left ( \tan \left ( dx+c \right ) -i \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)/(a*cos(d*x+c)+I*a*sin(d*x+c))^3,x)

[Out]

I/d/a^3*ln(tan(d*x+c)-I)+2/d/a^3/(tan(d*x+c)-I)

________________________________________________________________________________________

Maxima [A]  time = 1.61716, size = 134, normalized size = 2.2 \begin{align*} -\frac{4 \, d x + 4 \, c - 2 \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right ) - 2 i \, \cos \left (2 \, d x + 2 \, c\right ) + i \, \log \left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right ) - 2 \, \sin \left (2 \, d x + 2 \, c\right )}{2 \, a^{3} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a*cos(d*x+c)+I*a*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

-1/2*(4*d*x + 4*c - 2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1) - 2*I*cos(2*d*x + 2*c) + I*log(cos(2*d*x
 + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1) - 2*sin(2*d*x + 2*c))/(a^3*d)

________________________________________________________________________________________

Fricas [A]  time = 0.480306, size = 157, normalized size = 2.57 \begin{align*} -\frac{{\left (2 \, d x e^{\left (2 i \, d x + 2 i \, c\right )} + i \, e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - i\right )} e^{\left (-2 i \, d x - 2 i \, c\right )}}{a^{3} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a*cos(d*x+c)+I*a*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

-(2*d*x*e^(2*I*d*x + 2*I*c) + I*e^(2*I*d*x + 2*I*c)*log(e^(2*I*d*x + 2*I*c) + 1) - I)*e^(-2*I*d*x - 2*I*c)/(a^
3*d)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a*cos(d*x+c)+I*a*sin(d*x+c))**3,x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [A]  time = 1.14531, size = 138, normalized size = 2.26 \begin{align*} -\frac{-\frac{2 i \, \log \left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}{a^{3}} + \frac{i \, \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right )}{a^{3}} + \frac{i \, \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right )}{a^{3}} + \frac{3 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 10 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 3 i}{a^{3}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}^{2}}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a*cos(d*x+c)+I*a*sin(d*x+c))^3,x, algorithm="giac")

[Out]

-(-2*I*log(tan(1/2*d*x + 1/2*c) - I)/a^3 + I*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^3 + I*log(abs(tan(1/2*d*x +
1/2*c) - 1))/a^3 + (3*I*tan(1/2*d*x + 1/2*c)^2 + 10*tan(1/2*d*x + 1/2*c) - 3*I)/(a^3*(tan(1/2*d*x + 1/2*c) - I
)^2))/d